package com.neo.impatient.C05_Class.C05_01_SimpleClass

class Counter {
  private var value = 0
  def increment() {value += 1}


  def current() = value


}



object Counter{
  def main(args: Array[String]): Unit = {
    val mycounter =  new Counter()
    mycounter.increment()
    println("调用无参数方法时你可以写上括号，也可以不写")
    println(mycounter.current())
    println(mycounter.current)
  }

}
